package cn.edu.ntu.yyl.service;

import cn.edu.ntu.yyl.pojo.article.Article;
import cn.edu.ntu.yyl.pojo.article.ArticleCategory;

import java.util.List;

public interface CategoryService {
    //添加文章分类
    int AddNewArticleCategory(ArticleCategory articleCategory);
    //删除文章分类
    int DeleteArticleCategory(ArticleCategory articleCategory);
    //修改文章分类
    int UpdateArticleCategory(ArticleCategory articleCategory);
    //查询所有分类
    List<ArticleCategory> SelectAllArticleCategory();
    //查询父分类
    ArticleCategory SelectCategoryFather(ArticleCategory articleCategory);
    //查询子分类
    List<ArticleCategory> SelectCategoryChildren(ArticleCategory articleCategory);
    //查询文章相关的分类
    ArticleCategory SelectCategoryByArticle(Article article);
    //按照ID查询
    ArticleCategory SelectCategoryById(Integer id);

    //添加标签
    int AddNewTag(ArticleCategory articleCategory);
    //删除标签
    int DeleteTag(ArticleCategory articleCategory);
    //修改标签
    int UpdateTag(ArticleCategory articleCategory);
    //查询标签
    List<ArticleCategory> SelectTag();
    //查询文章的标签
    List<ArticleCategory> SelectTagByArticle(Article article);
    //按照ID查询
    ArticleCategory SelectTagById(Integer id);

    //分页查询分类
    List<ArticleCategory> SelectCategoryBylimit(int index,int pageSize);
    //分页查询标签
    List<ArticleCategory> SelectTagBylimit(int index,int pageSize);
}
